#!/bin/sh
echo "------------开始创建dw.org_info--------------"
hive -e "create table if not exists dw.sys_user_info(
  user_id string, 
  user_name string, 
  job string, 
  dept_id string, 
  password string, 
  pwd_mod_status string, 
  create_time string, 
  mgr_id string, 
  mgr_name string, 
  org_id string, 
  legal_rep string, 
  gender string, 
  age string, 
  birth_dt string, 
  cer_type string, 
  cer_number string, 
  birth_addr string, 
  off_short_num string, 
  email string, 
  old_user_id string, 
  user_type string, 
  operator_id string, 
  last_mai_user_id string, 
  last_mai_time string, 
  last_mai_ins_id string, 
  user_status string, 
  phone string, 
  role_id string, 
  re_dt string, 
  remarks string,
  etl_time string
  ) 
row format delimited fields terminated by ',';"
echo $?
echo "------------dw.sys_user_info已创建完成--------------"
echo "------------开始创建dw.org_info--------------"
hive -e "create table if not exists dw.org_info(
  orgid string, 
  sortcode string, 
  financial string, 
  orgname string, 
  orgcompletename string, 
  orgengname string, 
  orgrefname string, 
  porgid string, 
  orglevel string, 
  orgphone string, 
  orgadress string, 
  orgprovince string, 
  orgzipcode string, 
  network string, 
  istree string, 
  orgauthority string, 
  orgstatus string, 
  orgsquence string, 
  orgtype string, 
  orgdatadate string, 
  oldorgid string, 
  oldorgtype string, 
  orgmergeid string, 
  notes string, 
  establishdate string, 
  orgbegindate string, 
  orgenddate string, 
  inputuserid string, 
  inputusername string, 
  updatedate string,
  etl_time string
  )
  row format delimited fields terminated by ',';"
  echo $?
  echo "------------dw.org_info已创建完成--------------"